package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RcNomComerc generated by hbm2java
 */
@Entity
@Table(name = "RC_NOM_COMERC", schema = "RUC")
@SequenceGenerator(name="SEQ_RC_NOM_COMERC" , sequenceName="SEQ_RC_NOM_COMERC")
public class RcNomComerc implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6570996082398241197L;
	private Long inomComercial;
	private RcRuc rcRuc;
	private String snomComercial;
	private String sanagramaNcom;
	private String nfolio;
	private Date finomComer;
	private String cusuario;
	
	/**
	 * @return the cusuario
	 */
	@Column(name = "C_USUARIO", nullable = true, length = 30)	
	public String getCusuario() {
		return cusuario;
	}

	/**
	 * @param cusuario the cusuario to set
	 */
	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	/**
	 * @return the finomComer
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FI_NOM_COMER",updatable= false)	
	public Date getFinomComer() {
		return finomComer;
	}

	/**
	 * @param finomComer the finomComer to set
	 */
	public void setFinomComer(Date finomComer) {
		this.finomComer = finomComer;
	}

	/**
	 * @return the ffnomComer
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FF_NOM_COMER", nullable = true)	
	public Date getFfnomComer() {
		return ffnomComer;
	}

	/**
	 * @param ffnomComer the ffnomComer to set
	 */
	public void setFfnomComer(Date ffnomComer) {
		this.ffnomComer = ffnomComer;
	}

	private Date ffnomComer;	

	public RcNomComerc() {
	}

	public RcNomComerc(Long inomComercial, RcRuc rcRuc, String snomComercial) {
		this.inomComercial = inomComercial;
		this.rcRuc = rcRuc;
		this.snomComercial = snomComercial;
	}

	public RcNomComerc(Long inomComercial, RcRuc rcRuc, String snomComercial,
			String sanagramaNcom, String nfolio, Date finomComer, Date ffnomComer, String cusuario) {
		this.inomComercial = inomComercial;
		this.rcRuc = rcRuc;
		this.snomComercial = snomComercial;
		this.sanagramaNcom = sanagramaNcom;
		this.nfolio = nfolio;
		this.finomComer = finomComer;
		this.ffnomComer = ffnomComer;
		this.cusuario = cusuario;
	}

	@Id
	@Column(name = "I_NOM_COMERCIAL", unique = true, nullable = false, precision = 10, scale = 0)
	@GeneratedValue(strategy=GenerationType.AUTO, generator="SEQ_RC_NOM_COMERC")
	public Long getInomComercial() {
		return this.inomComercial;
	}

	public void setInomComercial(Long inomComercial) {
		this.inomComercial = inomComercial;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "NIT", nullable = false)
	public RcRuc getRcRuc() {
		return this.rcRuc;
	}

	public void setRcRuc(RcRuc rcRuc) {
		this.rcRuc = rcRuc;
	}

	@Column(name = "S_NOM_COMERCIAL", nullable = false, length = 40)
	public String getSnomComercial() {
		return this.snomComercial;
	}

	public void setSnomComercial(String snomComercial) {
		this.snomComercial = snomComercial;
	}

	@Column(name = "S_ANAGRAMA_NCOM", length = 24)
	public String getSanagramaNcom() {
		return this.sanagramaNcom;
	}

	public void setSanagramaNcom(String sanagramaNcom) {
		this.sanagramaNcom = sanagramaNcom;
	}

	@Column(name = "N_FOLIO", length = 12)
	public String getNfolio() {
		return this.nfolio;
	}

	public void setNfolio(String nfolio) {
		this.nfolio = nfolio;
	}

}
